﻿using System;
using System.Collections.Generic;
using System.Web.Services;
using MonkeyShop.Admin.Models;

namespace MonkeyShop.Web
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //var adminUserBiz = new AdminUserBiz();
            //var password = FormsAuthentication.HashPasswordForStoringInConfigFile("admin!@#", "SHA1");
            //var adminUserModel = adminUserBiz.LogIn("admin", password);
            //Response.Write(adminUserModel);
        }

        [WebMethod(EnableSession = true)]
        public static object Test2(int id)
        {
            var users = new List<AdminUserModel>
                        {
                            new AdminUserModel
                            {
                                Id = 1,
                                Code = "",
                                Name = "Admin1",
                                UserName = "admin",
                                MailAddress = "quochien@gmail.com"
                            },
                            new AdminUserModel
                            {
                                Id = 2,
                                Code = "",
                                Name = "Admin2",
                                UserName = "admin",
                                MailAddress = "quochien@gmail.com"
                            }
                        };
            return new { Result = "OK", Records = users };
        }
    }
}